package com.baymax.study.security.controller;

import com.baymax.study.atomic.tools.ResultMsg;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class HelloController {

    @GetMapping("/hello")
    @PreAuthorize("hasAuthority('m:system.config')")
    public ResultMsg hello() {
        return ResultMsg.buildSuccess("恭喜你，访问成功");
    }
}

